#ifndef CONFIG_PRINT_H
#define CONFIG_PRINT_H

#include <stdint.h>
#include <stdbool.h>

#define IS_ENABLE(A)    ((A) == true)
#define IS_DISABLE(A)   ((A) == false)
#define IS_DEFINE(A)    (A)

#define CONFIG_LASER      false  //true
#define CONFIG_EXTRUDER   true


#define USING_RTTHREAD_OS  true

/* 定时器名称 */
#ifdef SOC_FAMILY_STM32
#define STEP_SCHDULE_HWTIMER_DEV_NAME   "timer3"
#elif (defined SOC_AB32VG1)
#define STEP_SCHDULE_HWTIMER_DEV_NAME   "timer1"
#endif
/* 步进电机step引脚计数频率（1M） */
#ifdef SOC_FAMILY_STM32
#define STEP_SCHDULE_TIMER_FREQ         (100000UL)
#elif (defined SOC_AB32VG1)
#define STEP_SCHDULE_TIMER_FREQ         (50000UL)
#endif
/* 步进电机step最大频率（160K/2） */
#ifdef SOC_FAMILY_STM32
#define STEP_SCHDULE_FREQ               (50000UL)
#elif (defined SOC_AB32VG1)
#define STEP_SCHDULE_FREQ               (25000UL)
#endif
#ifdef SOC_SERIES_STM32F4
    #define MOTION_STEP_X_PIN_PWM            25         /* PB9 */
    #define MOTION_STEP_X_PIN_EN             55         /* PD7 */
    #define MOTION_STEP_X_PIN_DIR            45         /* PC13 */

    #define MOTION_STEP_Y_PIN_PWM            24        /* PB8 */
    #define MOTION_STEP_Y_PIN_EN             55        /* PD7 */
    #define MOTION_STEP_Y_PIN_DIR            70        /* PE6 */

    #define MOTION_STEP_Z_PIN_PWM            23        /* PB7 */
    #define MOTION_STEP_Z_PIN_EN             55        /* PD7 */
    #define MOTION_STEP_Z_PIN_DIR            69        /* PE5 */

    #define ENDSTOP_Z1                                 /*   */
    #define ENDSTOP_Z2                                 /*   */
#elif (defined SOC_AB32VG1)
    #define MOTION_STEP_X_PIN_PWM            1         /* PA.1 */
    #define MOTION_STEP_X_PIN_EN             4         /* PA.4 */
    #define MOTION_STEP_X_PIN_DIR            6         /* PA.6 */

    #define MOTION_STEP_Y_PIN_PWM            18        /* PE.5 */
    #define MOTION_STEP_Y_PIN_EN             MOTION_STEP_X_PIN_EN
    #define MOTION_STEP_Y_PIN_DIR            20        /* PE.7 */

    #define MOTION_STEP_Z_PIN_PWM            13        /* PE.0 */
    #define MOTION_STEP_Z_PIN_EN             MOTION_STEP_X_PIN_EN
    #define MOTION_STEP_Z_PIN_DIR            14        /* PE.1 */

    #define ENDSTOP_Z1                                 /*   */
    #define ENDSTOP_Z2                                 /*   */
#endif
#define TEMPERATURE_NTC_ADC_DEV_NAME    "adc0"      /* adc驱动名称 */
#ifdef SOC_FAMILY_STM32
#define TEMPERATURE_NTC_ADC_DEV_CHANNEL  (14)        /* ADC通道 */
#elif (defined SOC_AB32VG1)
#define TEMPERATURE_NTC_ADC_DEV_CHANNEL  (0)        /* ADC通道 */
#endif


#endif // CONFIG_PRINT_H
